+2007-05-13 Emmanuele Bassi <ebassi@gnome.org>
+
+ * gtk/gtksearchenginesimple.c: Include <ftw.h> and use nftw() and
+ all the symbols defined in <ftw.h> conditionally.
+
2007-05-13 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkevents-win32.c: Only do the configure event context
#include "xdgmime/xdgmime.h"
#include <string.h>
+
+#ifdef HAVE_FTW_H
#include <ftw.h>
+#endif
+
#include <glib/gstrfuncs.h>
#define BATCH_SIZE 500
static GStaticPrivate search_thread_data = G_STATIC_PRIVATE_INIT;
+#ifdef HAVE_FTW_H
static int
search_visit_func (const char *fpath,
const struct stat *sb,
if (data->n_processed_files > BATCH_SIZE)
send_batch (data);
-
+
if (is_hidden)
return FTW_SKIP_SUBTREE;
else
return FTW_CONTINUE;
}
+#endif /* HAVE_FTW_H */
static gpointer
search_thread_func (gpointer user_data)
{
+#ifdef HAVE_FTW_H
SearchThreadData *data;
data = user_data;
send_batch (data);
g_idle_add (search_thread_done_idle, data);
+#endif
return NULL;
}
GtkSearchEngine *
_gtk_search_engine_simple_new (void)
{
- GtkSearchEngine *engine;
-
- engine = g_object_new (GTK_TYPE_SEARCH_ENGINE_SIMPLE, NULL);
-
- return engine;
+#ifdef HAVE_FTW_H
+ return g_object_new (GTK_TYPE_SEARCH_ENGINE_SIMPLE, NULL);
+#else
+ return NULL;
+#endif
}